package cn.codeforfun.service;

import cn.codeforfun.dao.StudentDao;
import cn.codeforfun.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * Created by Administrator on 2016/9/22.
 */
@Service
public class StudentService {
    @Autowired
    private StudentDao studentDao;

    public Collection<Student> findAll() {
        return studentDao.findAll();
    }

    public void save(Student student) {
        studentDao.save(student);
    }

    public Student get(Integer id) {
        return studentDao.get(id);
    }

    public void delete(Integer id) {
        studentDao.delete(id);
    }
}
